<div class="container">
    <nav class="navbar navbar-expand-lg navbar-dark bg-primary">
        <a class="navbar-brand" href="{{route('home')}}">首页</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item active">
                    <a class="nav-link" href="{{route('member')}}">会员列表</a>
                </li>
            </ul>
            @if(Auth::check ())
                <button class="btn btn-danger my-2 my-sm-0 mr-2" >当前用户：{{Auth::User()->name}}</button>
                <a class="btn btn-danger my-2 my-sm-0 mr-2" href="{{route ('user.edit',Auth::id())}}" >修改资料</a>
                <a class="btn btn-success my-2 my-sm-0" href="{{route('logout')}}">退出</a>
                @else
                <a class="btn btn-danger my-2 my-sm-0 mr-2" href="{{route('zhuce')}}" >注册</a>
                <a class="btn btn-success my-2 my-sm-0" href="{{route('login')}}">登录</a>
            @endif
        </div>
    </nav>
</div>